$(function() {
	var email = getLocationString("email");
	var innerID = getLocationString("innerID");
	var username = getLocationString("username");
	if(email == undefined || innerID == undefined || username == undefined ||
	   email == "" || innerID == "" || username == "" ||
	   email == "null" || innerID == "null" || username == "null" || 
	   $.trim(email) == "" || $.trim(innerID) == "" || $.trim(username) == "") {
		location.href = ctxPath + "/initRegisterPage.do";
	}
	
	$("#email").html("登陆邮箱<a>"+email+"</a>,并按邮件提示操作即可");
	
	$("#sendMailBtn").click(function() {
		var url = ctxPath + "/reSendEmail.do";
		var data = {"innerID": innerID, "email": email, "username": username};
		doPostReq(url, data, function(rsp) {
			alert("发件发送成功，请查收邮箱.");
		});
	});
	
	$('#loginBtn').click(function() {
        location.href = ctxPath + "/initLoginPage.do";
    });
	
	$('#registerBtn').click(function() {
        location.href = ctxPath + "/initRegisterPage.do";
    });
	
});